package labb4;

/**
 *
 * @author Pontus
 */
public class Client {
    
    
    
    public static void main(String[] args){
    Leaf banan, tampong;
    Composite vaska = new Composite("Väska", 2);
    Composite pase = new Composite("Påse", 1.5);
    pase.add(new Leaf("Gamla tidningar", 1.8));
    pase.add(tampong = new Leaf("Tampong", 0.2));
    pase.add(new Leaf("CD", 0.2));
    vaska.add(banan = new Leaf("Banan", 0.5));
    vaska.add(new Leaf("Första-hjälpen-kitt", 2));
    vaska.add(new Leaf("Kalender", 1));
    vaska.add(new Leaf("Nycklar", 1));
    vaska.add(pase);
    
    System.out.println(vaska.toString());
    System.out.println(vaska.getWeight()+" kg \n");
    
    pase.remove(tampong);
    vaska.remove(banan);
    
    
    System.out.println("Nu tar vi bort: Tampong, Banan");
    System.out.println("Kvar blir:");
    
    System.out.println(vaska.toString());
    System.out.println(vaska.getWeight()+" kg");
    
    }
}
